home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / exec / addlibrary.c < prev    next >
C/C++ Source or Header  |  1996-10-24  |  2KB  |  81 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: addlibrary.c,v 1.5 1996/10/24 15:50:41 aros Exp $
  4.     $Log: addlibrary.c,v $
  5.     Revision 1.5  1996/10/24 15:50:41  aros
  6.     Use the official AROS macros over the __AROS versions.
  7.  
  8.     Revision 1.4  1996/08/13 13:55:55  digulla
  9.     Replaced AROS_LA by AROS_LHA
  10.     Replaced some AROS_LH*I by AROS_LH*
  11.     Sorted and added includes
  12.  
  13.     Revision 1.3  1996/08/01 17:41:02  digulla
  14.     Added standard header for all files
  15.  
  16.     Desc:
  17.     Lang: english
  18. */
  19. #include <exec/execbase.h>
  20. #include <aros/libcall.h>
  21.  
  22. /*****************************************************************************
  23.  
  24.     NAME */
  25.     #include <clib/exec_protos.h>
  26.  
  27.     AROS_LH1(void, AddLibrary,
  28.  
  29. /*  SYNOPSIS */
  30.     AROS_LHA(struct Library *, library,A1),
  31.  
  32. /*  LOCATION */
  33.     struct ExecBase *, SysBase, 66, Exec)
  34.  
  35. /*  FUNCTION
  36.     Adds a given library to the system's library list after checksumming
  37.     the library vectors. This function is not for general use but
  38.     (of course) for building shared librarys that don't use exec's
  39.     MakeLibrary() mechanism.
  40.  
  41.     INPUTS
  42.     library - Pointer to a ready for use library structure.
  43.  
  44.     RESULT
  45.  
  46.     NOTES
  47.  
  48.     EXAMPLE
  49.  
  50.     BUGS
  51.  
  52.     SEE ALSO
  53.     RemLibrary(), MakeLibrary(), MakeFunctions(), InitStruct(), SumLibrary().
  54.  
  55.     INTERNALS
  56.  
  57.     HISTORY
  58.  
  59. ******************************************************************************/
  60. {
  61.     AROS_LIBFUNC_INIT
  62.  
  63.     /* Just in case the user forgot them */
  64.     library->lib_Node.ln_Type=NT_LIBRARY;
  65.     library->lib_Flags|=LIBF_CHANGED;
  66.  
  67.     /* Build checksum for library vectors */
  68.     SumLibrary(library);
  69.  
  70.     /* Arbitrate for the library list */
  71.     Forbid();
  72.  
  73.     /* And add the library */
  74.     Enqueue(&SysBase->LibList,&library->lib_Node);
  75.  
  76.     /* All done. */
  77.     Permit();
  78.     AROS_LIBFUNC_EXIT
  79. } /* AddLibrary */
  80.  
  81.